Introduction
The Agents Module provides comprehensive functionality for managing AI agents, creating tasks, and executing workflows within the xpander.ai platform.Overview
In this module, you can:- List, retrieve, and manage multiple AI agents
- Load specific agents and interact with their components
- Export agents as templates and import them across organizations
- Manage tasks, tools, and knowledge bases associated with each agent
- Retrieve, manage, and delete user sessions for agents with session storage
- Access configurable elements like MCP (Model Context Protocol) servers
Examples
Listing all Agents
This example demonstrates how to list all available agents in both asynchronous and synchronous styles.Asynchronous Example
Usingalist() to retrieve agents asynchronously:
Synchronous Example
Usinglist() to retrieve agents synchronously:
Loading a Specific Agent
Learn how to load a specific agent by its ID, which allows you to interact with its tools and tasks.Asynchronous Example
Synchronous Example
Creating and Managing Tasks
This section illustrates creating, managing, and executing tasks assigned to agents.Asynchronous Example
Synchronous Example
Session Management
Manage user sessions for agents using the Agno framework with session storage.Asynchronous Example
Synchronous Example
Agent Import & Export
Agent templates and cross-organization sharing are currently available via the REST API:- [Export Agent](/API reference/v1/agents/export-agent) - REST API endpoint
- [Import Agent](/API reference/v1/agents/import-agent) - REST API endpoint
- Agent Import & Export Guide - Complete guide
Continue to the [Agents API Reference](/API reference/agents/API reference) for detailed documentation on classes and methods.

